<!DOCTYPE HTML>
<html lang="en">
<head>
    <meta charset="utf-8" />
    <link rel="stylesheet" href="<?= Yii::app()->request->baseUrl; ?>/css/backend/style.css" />
    <script src="<?= Yii::app()->request->baseUrl; ?>/js/jquery-1.9.1.min.js"></script>
    <script type="text/javascript">
        $(document).ready(function() {
            var mainmenu = $('#nav_menu > ul');
            var header = mainmenu.find('ul').parent();
            header.each(function(i) {
                $(this).hover(
                    function(e) {
                        $(this).children("ul:eq(0)").slideDown(200);
                    },
                    function(e) {
                        $(this).children("ul:eq(0)").slideUp(100);
                    }
                );
            });
        });
    </script>
    <!--[if lt IE 9]>
    <script src="<?= Yii::app()->request->baseUrl; ?>/js/html5.js"></script>
    <![endif]-->
    <title><?= CHtml::encode($this->pageTitle); ?></title>
</head>
<body>
<div class="container">
    <!-- Begin Header -->
    <header>
        <div class="logo">
            <img src="<?= Yii::app()->request->baseUrl; ?>/css/backend/images/logo.png" />
        </div>
        
        <div class="user_cp">
            <ul>
                <li><?= Yii::t('BackEnd','Hi,'); ?> <?= Yii::app()->user->email; ?></li>
                <li><?= CHtml::link(Yii::t('BackEnd','Profile'), array('user/profile')); ?></li>
                <li><?= CHtml::link(Yii::t('BackEnd','Logout'), array('site/logout')); ?></li>
            </ul>
        </div>
    </header>
    <!-- End Header -->
    
    <!-- Begin Nav -->
    <nav id="nav_menu">
    <?php $this->widget('zii.widgets.CMenu', array(
        'items' => array(
            array('label' => Yii::t('BackEnd','Home page'), 'url' => array('site/index'), 'linkOptions' => array('class' => 'home')),
            array('label' => Yii::t('BackEnd','Content'), 'url' => array('article/admin'), 'linkOptions' => array('class' => 'control'), 'items' => array(
                array('label' => Yii::t('BackEnd','Manage Article'), 'url' => array('article/admin')),
                array('label'=>Yii::t('BackEnd','Manage Product'), 'url'=>array('product/admin')),
            )),
            array('label' => Yii::t('BackEnd','Settings'), 'url' => array('user/admin'), 'linkOptions' => array('class' => 'setting'), 'items' => array(
                array('label' => Yii::t('BackEnd','Manage User'), 'url' => array('user/admin')),
            )),
            array('label' => Yii::t('BackEnd','Gallery'), 'url' => array('gallery/index'), 'linkOptions' => array('class' => 'gallery')),
            array('label' => Yii::t('BackEnd','Visit site'), 'url' => array('../'), 'linkOptions' => array('class' => 'visit_site', 'target' => '_blank')),
        ),
    )); ?>
    </nav>
    <!-- End Nav -->
    
    <?= $content; ?>
</div>

<!-- Begin Footer -->
<footer>
    <span>Copyright Tivi - CMS. All Rights Reserved.</span>
</footer>
<!-- End Footer -->
</body>
</html>